﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Links.aspx.cs" Inherits="Manager_Links" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>友情链接管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server" AjaxLoadingType="mask" AutoSizePanelID="RegionPanel1" />
    <ext:RegionPanel ID="RegionPanel1" runat="server" ShowBorder="false">
        <Regions>
            <ext:Region ID="rLeft" runat="server" Position="Center" AutoScroll="true" ShowHeader="false"
                ShowBorder="false" Layout="fit" EnableBackgroundColor="true">
                <Items>
                    <ext:Grid ID="gridList" runat="server" AllowPaging="true" PageSize="25" ForceFitAllTime="true"
                        EmptyText="暂时没有相关数据!" RowNumberWidth="40px" DataKeyNames="lId" ShowBorder="false"
                        EnableRowNumber="true" IsDatabasePaging="true" EnableRowNumberPaging="true" AutoScroll="true"
                        Title="友情链接列表" EnableCheckBoxSelect="true" OnRowDataBound="gridDataList_RowDataBound"
                        OnRowCommand="gridList_RowCommand" OnPageIndexChange="gridList_PageIndexChange"
                        OnRowDoubleClick="gridList_RowDoubleClick" ShowHeader="false" EnableRowDoubleClick="true">
                        <Toolbars>
                            <ext:Toolbar ID="Toolbar2" runat="server">
                                <Items>
                                    <ext:ToolbarText ID="ToolbarText1" runat="server" Text="友情链接列表">
                                    </ext:ToolbarText>
                                    <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                                    </ext:ToolbarFill>
                                    <ext:ToolbarText ID="ToolbarText2" runat="server" Text="（双击编辑友情链接，若要新增则点击“重置”即可！）"
                                        CssStyle="color:red">
                                    </ext:ToolbarText>
                                    <ext:Button ID="btnSelectDelete" runat="server" Text="删除选中" Icon="delete" OnClick="btnSelectDelete_Click"
                                        ConfirmText="是否确定删除？">
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </Toolbars>
                        <Columns>
                            <ext:BoundField ID="bfTitle" ColumnID="bfTitle" runat="server" DataField="lTitle"
                                HeaderText="站点名称" />
                            <ext:TemplateField ID="tfLogo" runat="server" HeaderText="LOGO图标">
                                <ItemTemplate>
                                    <asp:Literal ID="litShowLogo" runat="server"></asp:Literal>
                                </ItemTemplate>
                            </ext:TemplateField>
                            <ext:BoundField ID="bfUrl" ColumnID="bfUrl" runat="server" DataField="lUrl" HeaderText="网址" />
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Region>
            <ext:Region ID="rRight" runat="server" AutoScroll="true" Position="right" ShowHeader="false"
                Split="true" ShowBorder="false" EnableBackgroundColor="true" Width="360px" Height="200px">
                <Items>
                    <ext:SimpleForm ID="sfObject" runat="server" BodyPadding="5px" Title="新增（编辑）友情链接"
                        LabelWidth="70px" EnableBackgroundColor="true" AutoScroll="true" LabelAlign="Right"
                        FooterBarAlign="center">
                        <Items>
                            <ext:HiddenField ID="hfLinkId" runat="server">
                            </ext:HiddenField>
                            <ext:TextBox ID="txtTitle" runat="server" Label="站点名称" Required="true" EmptyText="请填写站点名称">
                            </ext:TextBox>
                            <ext:CheckBox ID="cboxType" runat="server" Label="链接类型" Text="图片/文字">
                            </ext:CheckBox>
                            <ext:FileUpload ID="fuLogo" runat="server" Label="LOGO" EmptyText="图片链接有效！">
                            </ext:FileUpload>
                            <ext:TextBox ID="txtUrl" runat="server" Label="URL" Required="true" EmptyText="请填写网址，必带“http://”！"
                                Regex="(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?">
                            </ext:TextBox>
                        </Items>
                        <Toolbars>
                            <ext:Toolbar ID="Toolbar1" runat="server" Position="footer">
                                <Items>
                                    <ext:Button ID="btnSubmit" runat="server" Text="资料保存" Icon="systemsave" ValidateForms="sfObject"
                                        OnClick="btnSubmit_Click">
                                    </ext:Button>
                                    <ext:Button ID="btnReset" runat="server" Text="重 置" Icon="reload">
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </Toolbars>
                    </ext:SimpleForm>
                </Items>
            </ext:Region>
        </Regions>
    </ext:RegionPanel>
    </form>
</body>
</html>
